﻿// See https://aka.ms/new-console-template for more information
class Test1
{
    static void  Calc(int[] array)
    {
        int sum = 0;
        foreach(var num in array) { 
            sum += num;
        }
        Console.WriteLine($"max value is {array.Max()}");
        Console.WriteLine($"min value is {array.Min()}");
        Console.WriteLine($"average value is {sum / array.Length}");
        Console.WriteLine($"sum is {sum}");
        
    }
    static void Main(string[] args)
    {
        int[] array = { 1, 2, 3, 5 };
        Calc(array);
    }
}